{% extends "base.html" %}

{% block content %}
    <p>
    {% if user.is_authenticated %}
        {% include "form.html" %}
    {% endif %}
    </p>
    {% if dweetList.count %}
        {% for dweet in dweetList %}
            {{dweet.id}} - {{ dweet }} - {{ dweet.date_created|date:"D d M Y" }} by {{ dweet.user}}
            {% if user.is_authenticated %}
                - <a href="/dweet/{{dweet.id}}/delete/">delete</a>
            {% endif %}
                <br/>
        {% endfor %}
    {% else %}
        <p>There are no dweets :( sorry</p>
    {% endif %}


{% endblock %}